Pod::Spec.new do |s|
  s.name = "ReactiveObjC"
  s.version = "3.0.0.1"
  s.summary = "The 2.x ReactiveCocoa Objective-C API: Streams of values over time"
  s.license = {"type"=>"MIT", "file"=>"LICENSE.md"}
  s.authors = "ReactiveCocoa"
  s.homepage = "https://reactivecocoa.io"
  s.description = "ReactiveObjC (formally ReactiveCocoa or RAC) is an Objective-C\nframework inspired by [Functional Reactive Programming](\nhttp://en.wikipedia.org/wiki/Functional_reactive_programming).\nIt provides APIs for composing and **transforming streams of values**."
  s.social_media_url = "https://twitter.com/ReactiveCocoa"
  s.documentation_url = "https://github.com/ReactiveCocoa/ReactiveObjC/tree/master/Documentation#readme"
  s.screenshots = "https://reactivecocoa.io/img/logo.png"
  s.frameworks = ['UIKit', 'MapKit','AddressBook','imageIO','CoreTelephony','MobileCoreServices','SystemConfiguration','Security','CoreGraphics','Accelerate','CoreLocation','SystemConfiguration','MessageUI']
  s.requires_arc = true
  s.source = { git: "https://git.oschina.net/ambitious/ReactiveObjC.git",
               tag: s.version }

  s.ios.deployment_target    = '8.0'
  s.ios.vendored_framework   = 'ReactiveObjC-3.0.0/ios/ReactiveObjC.framework'
  s.prepare_command = <<-'CMD'.strip_heredoc
                        find -E . -type f -not -name 'RAC*' -regex '.*(EXT.*|metamacros)\.[hm]$' \
                                  -execdir mv '{}' RAC'{}' \;
                        find . -regex '.*\.[hm]' \
                               -exec perl -pi \
                                          -e 's@"(?:(?!RAC)(EXT.*|metamacros))\.h"@"RAC\1.h"@' '{}' \;
                        find . -regex '.*\.[hm]' \
                               -exec perl -pi \
                                          -e 's@<ReactiveObjC/(?:(?!RAC)(EXT.*))\.h>@<ReactiveObjC/RAC\1.h>@' '{}' \;
                      CMD
end
